<form class="form-horizontal" id="agentDetailForm">
    <input class="hidden" name="id" th:value="${product.id}">

    <div class="box-body">
        <div class="form-group required">
            <label for="prodCode" class="col-sm-3 control-label form-required">支付产品编码：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${product.prodCode}" class="form-control" name="prodCode" id="prodCode" require="必填项"  placeholder="" />
            </div>
        </div>
        <div class="form-group required">
            <label for="prodName" class="col-sm-3 control-label form-required">支付产品名称：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${product.prodName}" class="form-control" name="prodName" id="prodName" require="必填项"  placeholder="" />
            </div>
        </div>
        <div class="form-group required">
            <label for="prodDesc" class="col-sm-3 control-label form-required">支付产品描述：</label>
            <div class="col-sm-8">
                <input type="text" th:value="${product.prodDesc}"  class="form-control" name="prodDesc" id="prodDesc" require="必填项"  placeholder="" />
            </div>
        </div>

    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        <div class="pull-right">
            <button type="button" id="saveDetailAgent" class="btn btn-info">确定</button>
            <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
        </div>
    </div>
    <!-- /.box-footer -->
</form>

<script>
    $(function () {
        $("#saveDetailAgent").on('click', function () {
            if(doValidForm(agentDetailForm)){
                Core.mask("#saveDetailAgent")
                Core.postAjax(ctxPath + "/agent/edit",$("#agentDetailForm").serialize(),function (data) {
                    Core.unmask("#saveDetailAgent");
                    if(data.code==200){
                        $("#agentDetailModal").modal("hide");
                        Core.refreshJqTable("#table_list",true);
                    }
                    layer.msg(data.msg);
                })
            }
        })
    });
</script>